package at.patooogle.classquiz.web.repository.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 *
 * @author Thomas
 */
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.STRING)
public class Person implements Serializable {

    @Id
    @GeneratedValue
    private Long id;
    
    @Column
    private String username;
    
    @Column
    private String firstName;
    
    @Column
    private String lastName;
    

    // TODO encrypt
    @Column
    private String password;
    
    

}
